package com.xdq.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.PropertySource;

//指定只扫描SpringBoot类所在的包
//@SpringBootApplication(scanBasePackageClasses = SpringBoot.class)
//指定扫描哪个了所做的包.SpringBootApplication注解已包含ComponentScan注解，并定义了别名
//@ComponentScan(basePackageClasses =SpringBoot.class)

//不指定扫描包路径，则默认扫描路径是当前类所在的根包及其所有的子包
//@SpringBootApplication

//指定扫描包路径
@SpringBootApplication(scanBasePackages = {"com.xdq.springboot"})
@PropertySource(value={"springboot/application.properties"})
public class SpringBoot {

    public static void main(String[] args) {
        System.out.println("hello spring boot");
        SpringApplication.run(SpringBoot.class,args);
    }
}
